package com.gufe.mapper.admin.index;

import com.gufe.dto.adminIndex.IndexBarChartDTO;
import com.gufe.vo.adminIndex.IndexPieChartVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IndexMapper {

    @Select("SELECT count(*) from precollect_members where status = 0;")
    Integer getPreEnrollmentCount();

    @Select("SELECT count(*) from notice;")
    Integer getNotificationCount();

    @Select("SELECT count(*) from basic_info;")
    Integer getTotalReserveCount();

    @Select("SELECT count(*) from index_slider;")
    Integer getCarouselCount();

    @Select("SELECT COUNT(*) from precollect_members where created_at > #{startDate} && created_at < #{endDate} && status = 1")
    Integer preEnrollmentData(String startDate,String endDate);


    List<IndexPieChartVO> getPieChartData(String category);

    List<IndexBarChartDTO> getBarChartAgeDate(String category);

    List<IndexBarChartDTO> getBarChartHeightDates(String category);

    List<IndexBarChartDTO> getBarChartWeightDates(String category);


}
